package day12.edu;

// Created: 12/09/2025, ChangJiang Ru
public class PrintNumberTest {
    public static void main(String[] args) {
        EvenNumber e = new EvenNumber();
        OddNumber o = new OddNumber();

        e.start();
        o.start();

        System.out.println(Thread.currentThread().getName() + "=========");
    }
}

class EvenNumber extends Thread
{
    @Override
    public void run()
    {
        for (int i = 0; i <= 100; i++) {
            if( i % 2 == 0)
                System.out.println(Thread.currentThread().getName() + "----->" + i);
        }
    }
}

class OddNumber extends Thread
{
    @Override
    public void run()
    {
        for (int i = 0; i <= 100; i++) {
            if( i % 2 != 0)
                System.out.println(Thread.currentThread().getName() + "======" + i);
        }
    }
}